//------------------------------------------------------------------------
PolylineEncoder::PolylineEncoder(int numLevels, double zoomFactor, double vs):
- numLevels(numLevels), zoomFactor(zoomFactor), verySmall(vs)
+ numLevels(numLevels), verySmall(vs)
{
if (verySmall <=0.0)
verySmall = 1.0E-5;
const vector <double> &dists);
int numLevels;
- double zoomFactor;
double verySmall;
vector <double> zoomLevelBreaks;
};
class FormatLoad {
public:
- FormatLoad() {};
+ FormatLoad() : currentLine_(0) {};
~FormatLoad() {};
bool getFormats(QList<Format> &formatList);
private:
Ui_GMapDlg ui_;
Map *mapWidget_;
- bool showWaypoints_, showRoutes_, showTracks_;
QStandardItemModel *model_;
QStandardItem *wptItem_, *trkItem_, *rteItem_;
QList<QStandardItem *> wptList_, trkList_, rteList_;
timer_->setSingleShot(false);
connect(timer_, SIGNAL(timeout()), this, SLOT(timeoutX()));
stopCount_ = -1;
+ ecode_ = 0;
timer_->start();
errorString_ = "";
private:
QString currentVersion_;
- int upgradeCheckMethod_;
QNetworkAccessManager* manager_;
QNetworkReply* replyId_;
QUrl upgradeUrl_;
- bool httpRequestAborted_;
QString latestVersion_;
QDateTime upgradeWarningTime_; // invalid time if this object never issued.
QList<Format> &formatList_;
return SERIAL_ERROR;
}
- GPS_Packet_Read(fd, &rec);
+ if (!GPS_Packet_Read(fd, &rec)) {
+ return gps_errno;
+ }
GPS_Send_Ack(fd, &tra, &rec);
id = GPS_Util_Get_Short(rec.data);
return FRAMING_ERROR;
}
- GPS_Packet_Read(fd, &rec);
+ if (!GPS_Packet_Read(fd, &rec)) {
+ return gps_errno;
+ }
GPS_Send_Ack(fd, &tra, &rec);
n = GPS_Util_Get_Short(rec.data);
return FRAMING_ERROR;
}
- GPS_Packet_Read(fd, &rec);
+ if (!GPS_Packet_Read(fd, &rec)) {
+ return gps_errno;
+ }
GPS_Send_Ack(fd, &tra, &rec);
n = GPS_Util_Get_Short(rec.data);
psHooks->FClose( fp );
fp = psHooks->FOpen( pszFullname, "rb+" );
- if( fp == NULL )
+ if( fp == NULL ) {
+ free(pszBasename);
+ free(pszFullname);
return( NULL );
+ }
sprintf( pszFullname, "%s.cpg", pszBasename );